package jym.tan.movielibrary.utils;

import java.lang.reflect.ParameterizedType;

public class ClassUtils {

	private static final ClassUtils classUtils = new ClassUtils();
		
	public String getResolvedClassName(Class<?> clazz) {
		String className = "";
		synchronized (this) {
			className = ((Class<?>)((ParameterizedType) clazz.getGenericSuperclass()).getActualTypeArguments()[0]).getSimpleName();
		}		
		return className;
	}
	
	public synchronized static ClassUtils getInstance() {		
		return classUtils;
	}	
}
